#pragma once
#include <iostream>
#include <string>

/////////////////////////////////////////////////////////////////////////////////////////////
/*

    User是一个user表的ORM类
    
*/
class User
{
public:
    User(const int id = -1, const std::string& name = "", const std::string& password = "", \
    const std::string& state = "offline")
    :_id(id), _name(name), _password(password), _state(state)
    {}
    void SetId(const int id)
    {
        _id = id;
    }
    void SetName(const std::string& name)
    {
        _name = name;
    }
    void SetPassword(const std::string& password)
    {
        _password = password;
    }
    void SetState(const std::string& state)
    {
        _state = state;
    }

    int GetId() const 
    {
        return _id;
    }
    std::string GetName() const
    {
        return _name;
    }
    std::string GetPassword() const 
    {
        return _password;
    }
    std::string GetState() const 
    {
        return _state;
    }
protected:
    int _id;
    std::string _name;
    std::string _password;
    std::string _state;
};